package com.cy.detectsys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName tc_package
 */
@TableName(value ="tc_package")
@Data
public class TcPackage implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String packageNum;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 探测域名
     */
    private String domains;

    /**
     * 探测阶段
     */
    private Integer level;

    private Integer maxLevel;

    /**
     * 状态
     */
    private String status;

    /**
     * 执行人
     */
    private String createUser;

    /**
     * 配置文件包的路径
     */
    private String packagePath;

    private String password;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TcPackage other = (TcPackage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPackageNum() == null ? other.getPackageNum() == null : this.getPackageNum().equals(other.getPackageNum()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getDomains() == null ? other.getDomains() == null : this.getDomains().equals(other.getDomains()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getPackagePath() == null ? other.getPackagePath() == null : this.getPackagePath().equals(other.getPackagePath()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPackageNum() == null) ? 0 : getPackageNum().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getDomains() == null) ? 0 : getDomains().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getPackagePath() == null) ? 0 : getPackagePath().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", packageNum=").append(packageNum);
        sb.append(", createTime=").append(createTime);
        sb.append(", domains=").append(domains);
        sb.append(", level=").append(level);
        sb.append(", status=").append(status);
        sb.append(", createUser=").append(createUser);
        sb.append(", packagePath=").append(packagePath);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}